﻿using System;

namespace NumberParser
{
    public static class MathExtensions
    {
        /// <summary>
        /// Returns a specified number raised to the specified power.
        /// </summary>
        /// <param name="this">A number to be raised to a power.</param>
        /// <param name="power">A number that specifies a power.</param>
        /// <returns>The number x raised to the power y.</returns>
        public static double Pow(this double @this, double power)
        {
            return Math.Pow(@this, power);
        }

        /// <summary>
        /// Returns a specified number raised to the specified power.
        /// </summary>
        /// <param name="this">A number to be raised to a power.</param>
        /// <param name="power">A number that specifies a power.</param>
        /// <returns>The number x raised to the power y.</returns>
        public static double Pow(this int @this, double power)
        {
            return Math.Pow(@this, power);
        }

        public static int Add(this int @this, int value)
        {
            return @this + value;
        }

        public static int Subtract(this int @this, int value)
        {
            return @this - value;
        }

        public static int Subtract(this char @this, char value)
        {
            return @this - value;
        }
    }
}